/**
 * 版权所有（c）2021. 上海海鼎信息工程股份有限公司，保留所有权利
 */
package com.lovely602.design.behavior.observer.demo;

import java.util.EventObject;

/**
 * 铃声事件类：用于封装事件源及一些与事件相关的参数
 *
 * @author lizhixing
 */
public class RingEvent extends EventObject {
  private static final long serialVersionUID = 2140317385961717293L;

  /**
   * true表示上课铃声,false表示下课铃声
   */
  private boolean sound;

  public RingEvent(Object source, boolean sound) {
    super(source);
    this.sound = sound;
  }


  public void setSound(boolean sound) {
    this.sound = sound;
  }

  public boolean getSound() {
    return this.sound;
  }
}
